from apps.vadmin.op_drf.models import BaseModel
from django.db.models import CharField, IntegerField, BooleanField


class All_Kq_Orders(BaseModel):
    orderId = CharField(max_length=16, verbose_name='订单ID')
    compName = CharField(max_length=128, verbose_name='公司名称')
    projectName = CharField(max_length=255, verbose_name='项目名称', blank=True)
    products = CharField(max_length=255, verbose_name='成交产品列表', blank=True)
    dealNum = IntegerField(verbose_name='成交额', default=0, blank=True)
    orderDate = CharField(max_length=255, verbose_name='成交时间', blank=True)
    orderType = CharField(max_length=32, verbose_name='订单种类', blank=True)
    collaborator = CharField(max_length=32, verbose_name='业务员', blank=True)
    isEmployed = BooleanField(verbose_name="是否在职", default=True)
    sex = CharField(max_length=4, verbose_name='性别', default='男')
    position = CharField(max_length=16, verbose_name='职位', default='业务员')
    maxDepartment = CharField(max_length=16, verbose_name='所属大区', blank=True)
    department = CharField(max_length=32, verbose_name='所属部门', blank=True)

    class Meta:
        verbose_name = '所有订单信息'
        verbose_name_plural = verbose_name

    def __str__(self):
        return f"{self.compName}"
